package com.hexiang.book.domain;

import lombok.*;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@ToString
@Builder
@AllArgsConstructor
public class Book {
    /**
     * ID
     */
    private Long id;
    /**
     * 书名
     */
    private String name;
    /**
     * 价格
     */
    private BigDecimal price;
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
    /**
     * 修改时间
     */
    private LocalDateTime modifyTime;

    public Book(String name, BigDecimal price) {
        this.name = name;
        this.price = price;
        this.createTime = LocalDateTime.now();
        this.modifyTime = LocalDateTime.now();
    }

    public static void main(String[] args) {
        BigDecimal sumInterest = new BigDecimal("6.25");
        BigDecimal fee = new BigDecimal("5.61");

        sumInterest=sumInterest.add(fee);
        System.out.println(sumInterest);


    }
}